PreviousNextTracker indexSee it online !

(166/185) 371 - SFTP automatically reload buffer

I frequently run into issues because of a missing feature when editing a remote file (SFTP), therefore the priority is high. Remote files are not automatically refreshed when they change on (the remote) disk.

I'm not sure the best way to implement this, the below are suggestions only.
- Plugin can poll for changes automatically every N minutes (disable polling and change value of N in plugin preferences)
- Plugin should poll immediately when you start typing (i.e. when buffer dirty flag is set)
- Run a daemon process somehow on the remote server, which notifies of file changes. [1] It needs real ssh (shell) access to the host, but could give the same realtime behaviour as editing a local file. Could get complicated...

See also related #341 FTP: set buffer read-only flag from remote file

PS: the issue I typically see is when a colleague changed some code (in Perforce source control) in the same file where I'm working. So I have to merge the file. But it's easy to forget to hit reload in jEdit, and when you do that, your colleague is angry because you trashed all his work :(

[1] https://commons.apache.org/proper/commons-io/javadocs/api-2.4/org/apache/commons/io/monitor/FileAlterationObserver.html

Submitted bgolding - 2016-06-07 11:19:20.856000 Assigned
Priority 9 Labels sftp
Status open Group None
Resolution None

Comments